﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace BadassPhotoAlbum
{
    /**********************************************************
     * Created by: Adam Reaves, Mike Flood and Joseph Alfred
     * This form is used to expand the view of the photo selected.
     * Modified by: Steven Gonzalez & Adam Reaves 12/06/2011
     * ********************************************************/
    public partial class SinglePhotoViewForm : Form
    {
        private Photo photoToView;

     //This initializes the photoToView and displays the photo
        public SinglePhotoViewForm(Photo viewPhoto)
        {
            InitializeComponent();
            photoToView = viewPhoto;
            ShowPhoto();
        }

        //displays the current photo and the description
        private void ShowPhoto()
        {
            this.Text = photoToView.PhotoName;
            //photoDescriptionTextBox.Text = photoToView.PhotoDescription;
            photoDescripLabel.Text = photoToView.PhotoDescription;
            photoBox.Image = Image.FromStream(photoToView.GetFileDescriptor());
        }
    }
}
